package com.example.design.dahua.chainofresponsibility.new3;

/**
 * @author ebnew
 * 测试类
 */
public class Test {
    public static void main(String[] args) {
        AbstractHandler h1 = new ConcreteHandler1();
//        AbstractHandler h2 = new ConcreteHandler2();
//        AbstractHandler h3 = new ConcreteHandler3();
//        h1.setSuccessor(h2);
//        h2.setSuccessor(h3);

        int[] request = {2, 5, 14, 22, 18, 3, 20};
        for (int i : request) {
            h1.handleRequest(i);
        }
    }
}
